lst=list(input().split())
number_1=float(input())
number_2=float(input())
number=0
for i in lst:
    if number_2>float(i)>number_1:
        number=number+1
print(number)
